@extends('Admin.layout.layout')
@section('title','网站维护')
    <script type="text/javascript" charset="utf-8" src="/public/baidu/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/public/baidu/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/public/baidu/lang/zh-cn/zh-cn.js"></script>
    
@section('content')
	<div class="row">
		<div class="col-lg-12">
			<h1 class="page-header">网站维护</h1>
		</div>
		<!-- /.col-lg-12 -->
	</div>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default" style="height:450px;">
            <div class="panel-heading">
                网站维护   
            </div>
             
            <div class="panel-body" style="">
                <div class="row" style="margin-top:170px;">
                    <div class="col-lg-3"></div>         
                    <div class="col-lg-3 kaiqi" style="line-height:40px;width:100px;height:40px;border-radius:4px;background:#CCCCFF;text-align:center;">开启</div>
                    <div class="col-lg-2"></div>         

                    <div class="col-lg-3 guanbi" style="line-height:40px;width:100px;height:40px;border-radius:4px;background:#CCCCFF;text-align:center;">关闭</div>    
                    <div class="col-lg-1"></div>         

                </div>
                <!-- /.row (nested) -->
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
</div>  
@endsection
@section('myjs')
<script type="text/javascript">
    // alert($);
    //绑定开启事件
    $('.kaiqi').click(function(){
        // alert('开启');
        var dd = $(this);
        $.get('/admin/switch/kaiqi',{status:1},function(data){
            console.log(data);
            if(data == 1){
                alert('关闭成功');
            }else{
                alert('关闭失败');
            }
            // return false;
        })
    })

    //绑定关闭时间
    $('.guanbi').click(function(){
        // alert('关闭');
        //发送ajax
        var dd = $(this);
        $.get('/admin/switch/guanbi',{status:2},function(data){
            console.log(data);
            if(data == 1){
                alert('关闭成功');
            }else{
                alert('关闭失败');
            }
            // return false;
        })
    })
</script>
@endsection